package com.glorious.api.fallback;

import com.glorious.api.OAuthClientFeignClient;
import com.glorious.common.Result;
import com.glorious.common.ResultCode;
import com.glorious.entities.OauthClientDetails;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;

@Slf4j
@Component
public class OAuthClientFeignFallbackClient implements OAuthClientFeignClient {

    @Override
    public Result<OauthClientDetails> getOAuthClientById(@PathVariable String clientId) {
        log.error("feign远程调用系统认证服务异常后的降级方法");
        return Result.failed(ResultCode.DEGRADATION);
    }
}
